<h2>Products</h2>
<div *ngFor="let product of products ; index as productId">
  <h3>
    <!--[routerLink]填入路由器链接-->
    <a [title]="product.name + ' details'" [routerLink]="['/products',productId]"> 
    {{ product.name}}
    </a>
  </h3>

<p *ngIf="product.description">
  Description : {{ product.description }}
</p>

<button (click)="share()">
Share
</button>

<!--等号左边表示子元素中的属性，右边是父元素中的属性-->
<app-product-alerts
  [product]= "product"
  (notify) = "onNotify()">
</app-product-alerts>

</div>